package com.atung.parking.enums;

/**
 * @author Administrator
 */
public enum AdminType {

    SUPERADMIN,//公司管理员
    ADMIN,//客户管理员
    USER;//用户


    public static AdminType fromCode(int code) {
        switch (code) {
            case 0:
                return SUPERADMIN;
            case 1:
                return ADMIN;
            case 2:
                return USER;
            default:
                throw new IllegalArgumentException("Invalid code: " + code);
        }
    }

}
